How to capture included DXL files with baselines

I have a configuration management question related to included DXL code. I have DXL attributes that include DXL code using the #include statement. When I baseline a module, since the DXL code is included, the code is not captured with the baseline because it is in a file on the file system. If the DXL code changes, the baseline may be running different DXL which means I could have different results and thus not have a reproducible baseline.

I have started brainstorming a few ideas of the best way to capture the included DXL code with a baseline, but I thought I would pose the question to the forum to see if anyone else already has addressed this.

Thanks,
Marjorie
mtmccor - Wed Oct 27 07:52:39 EDT 2010

Re: How to capture included DXL files with baselines
Mathias Mamsch - Wed Oct 27 09:22:46 EDT 2010

Well. Obviously you should do version management on your source code. If you need multiple versions of your sourcecode to be available, I think the cleanest way would be to put them in a directory structure like:
 

- library
   - v1.0
      - addins
      - includes 
      - projectaddins
   - v2.0
      - addins
      - includes
      - projectaddins

 


In your DXL attributes you would then need to do #include <library/v1.0/addins/...> to exactly specify th version of your code and do a migration of all the DXL attributes whenever you change your code. Not very nice. This will probably only work if you don't change your code daily.

The next thing I can think of is to embed all the code in the DXL attributes. This is also bad, because you cannot do a good version management on the DXL attributes code. If someone makes changes to one DXL attribute you will never know. So also not so good. Lets think about something else.

What if we could just store the values of the DXL attributes in the baseline. You could create a Text attribute for every DXL attribute, which stores the values of the DXL attributes. You could do a custom baseline script, which will transfer the DXL attribute values to the text attributes, before doing the baseline relieving you of the code version management problem.

Maybe one can do some clever DXL which will store the values of all the DXL attributes somewhere in the module, and make the DXL attributes automatically show the stored value, if they are launched from a baseline.

Just some ideas, Mathias

 

 

 


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

 

 

Re: How to capture included DXL files with baselines
llandale - Wed Oct 27 14:18:51 EDT 2010

Tough situation. Distributed databases must avoid any #included code in Layout and AttrDXL since not every client will have access to THOSE server files.

For this situation, I'd find a way to physically include the included code directly in the Layout; that is, where-ever you see #include replace it with the contents of that file.

Frankly, I had numerous layouts that did this 10 years ago and had to abandon them since I've not solved the Baseline nor Distributed issues.

  • Louie

Re: How to capture included DXL files with baselines
David_G_Bond - Thu Oct 28 10:39:30 EDT 2010

llandale - Wed Oct 27 14:18:51 EDT 2010
Tough situation. Distributed databases must avoid any #included code in Layout and AttrDXL since not every client will have access to THOSE server files.

For this situation, I'd find a way to physically include the included code directly in the Layout; that is, where-ever you see #include replace it with the contents of that file.

Frankly, I had numerous layouts that did this 10 years ago and had to abandon them since I've not solved the Baseline nor Distributed issues.

  • Louie

This can also be an issue for a dxl attribute where the include file does not change but the server location of the include file changes.

One way to do this is to write a script that searches dxl attributes for include files and copies the contents of the include file in place of the include statement. Run this script right before baselining.

We had to develop such a script early in our program not for this reason but because our customer did not have access to the server upon which our dxl resided and we frequently made archives of our database for our customer's use.

This can also be done for any layout dxl that uses an include file.

  • David Bond

Re: How to capture included DXL files with baselines
Mathias Mamsch - Fri Oct 29 07:21:27 EDT 2010

David_G_Bond - Thu Oct 28 10:39:30 EDT 2010
This can also be an issue for a dxl attribute where the include file does not change but the server location of the include file changes.

One way to do this is to write a script that searches dxl attributes for include files and copies the contents of the include file in place of the include statement. Run this script right before baselining.

We had to develop such a script early in our program not for this reason but because our customer did not have access to the server upon which our dxl resided and we frequently made archives of our database for our customer's use.

This can also be done for any layout dxl that uses an include file.

  • David Bond

What if the included DXL also uses an include? Regards, Mathias

Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Re: How to capture included DXL files with baselines
David_G_Bond - Fri Oct 29 10:37:10 EDT 2010

Mathias Mamsch - Fri Oct 29 07:21:27 EDT 2010
What if the included DXL also uses an include? Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Recursion can be a wonderful thing
  • David Bond

Re: How to capture included DXL files with baselines
Mathias Mamsch - Fri Oct 29 11:03:31 EDT 2010

David_G_Bond - Fri Oct 29 10:37:10 EDT 2010
Recursion can be a wonderful thing

  • David Bond

Wow, so you made a little DXL parser in DXL? Respect!! I know from bad experience, that parsing DXL is no piece of cake, especially when it comes to all the possible ways in which include can be in the source code.
 

#include <...>
#include "..."
// #include <dont include me>
/* don't include: #include <xy> */ 
string code = "#include ..." ; eval_ code

 


Combined with the problem of locating the source files correctly (handle relative includes, network paths, ...), my guess is that this is not something you wrote in your lunch break :-)

Regards, Mathias

 

 


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

 

Re: How to capture included DXL files with baselines
mtmccor - Tue Nov 02 07:06:20 EDT 2010

Thank you everyone for your replies. You have confirmed for me that this configuration management issue of capturing included DXL files with baselines is non-trivial as I had feared. I appreciate the different suggestions, and I will now take those suggestions and decide how I want to proceed.